package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BizCmsArticleData;
import com.nmf.dao.gen.bean.BizCmsArticleDataExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizCmsArticleDataMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @SelectProvider(type=BizCmsArticleDataSqlProvider.class, method="countByExample")
    long countByExample(BizCmsArticleDataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @DeleteProvider(type=BizCmsArticleDataSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizCmsArticleDataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @Delete({
        "delete from cms_article_data",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @Insert({
        "insert into cms_article_data (id, content, ",
        "copyfrom, relation, ",
        "allow_comment)",
        "values (#{id,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}, ",
        "#{copyfrom,jdbcType=VARCHAR}, #{relation,jdbcType=VARCHAR}, ",
        "#{allowComment,jdbcType=CHAR})"
    })
    int insert(BizCmsArticleData record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @InsertProvider(type=BizCmsArticleDataSqlProvider.class, method="insertSelective")
    int insertSelective(BizCmsArticleData record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @SelectProvider(type=BizCmsArticleDataSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="copyfrom", property="copyfrom", jdbcType=JdbcType.VARCHAR),
        @Result(column="relation", property="relation", jdbcType=JdbcType.VARCHAR),
        @Result(column="allow_comment", property="allowComment", jdbcType=JdbcType.CHAR)
    })
    List<BizCmsArticleData> selectByExample(BizCmsArticleDataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @Select({
        "select",
        "id, content, copyfrom, relation, allow_comment",
        "from cms_article_data",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="copyfrom", property="copyfrom", jdbcType=JdbcType.VARCHAR),
        @Result(column="relation", property="relation", jdbcType=JdbcType.VARCHAR),
        @Result(column="allow_comment", property="allowComment", jdbcType=JdbcType.CHAR)
    })
    BizCmsArticleData selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @UpdateProvider(type=BizCmsArticleDataSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizCmsArticleData record, @Param("example") BizCmsArticleDataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @UpdateProvider(type=BizCmsArticleDataSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizCmsArticleData record, @Param("example") BizCmsArticleDataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @UpdateProvider(type=BizCmsArticleDataSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizCmsArticleData record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_article_data
     */
    @Update({
        "update cms_article_data",
        "set content = #{content,jdbcType=LONGVARCHAR},",
          "copyfrom = #{copyfrom,jdbcType=VARCHAR},",
          "relation = #{relation,jdbcType=VARCHAR},",
          "allow_comment = #{allowComment,jdbcType=CHAR}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizCmsArticleData record);
}